<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <body>

        <ui:composition>

            <h3>Relatório da Observação</h3>

            <div id="stylized" class="myform">


                <table>
                    <tr>
                        <td>#{ObservacaoController.observacaoAux.dataCriacao}</td>
                    </tr>
                    <tr>
                        <td><span style="font-weight: bold">Referente a:</span> #{ObservacaoController.observacaoAux.pagina}</td>
                    </tr>
                    <tr>
                        <td><span style="font-weight: bold">#{ObservacaoController.observacaoAux.nome}:</span> #{ObservacaoController.observacaoAux.observacao}</td>
                    </tr>

                </table>
                <br />  

                <h3>Comentários ( #{ObservacaoController.comentariosSize}  )</h3>

                <h:outputText value="Nenhum comentário até agora" rendered="#{empty ObservacaoController.comentarios}" />

                <c:forEach items="#{ObservacaoController.comentarios}" var="comentarioTemp"  >

                    <table>
                        <tr>
                            <td>#{comentarioTemp.dataCriacao}</td>
                        </tr>
                        <tr>
                            <td>#{comentarioTemp.nome} : #{comentarioTemp.comentario}</td>
                        </tr>
                    </table>
                    <br />
                </c:forEach>
                <br />


                <h:commandButton styleClass="button" action="#{PageManager.setPageObservacaoCad}" value="Novo" />
                <h:commandButton styleClass="button" action="#{ObservacaoController.comentar}" value="Comentar" />
                <!--                        <h:commandButton styleClass="button" action="{ObservacaoController.e}" value="Editar" />
                                        <h:commandButton styleClass="button" action="{AlunoController.destroyButton}" value="Excluir" />-->




            </div>

        </ui:composition>

    </body>
</html>
